﻿using Bdcs.Core;
using Furion;
using Furion.DatabaseAccessor;
using Microsoft.Extensions.DependencyInjection;

namespace Bdcs.EntityFramework.Core
{
    [AppStartup(700)]
    public sealed class BdcsEntityFrameworkCoreStartup : AppStartup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            // 配置数据库上下文，支持N个数据库
            services.AddDatabaseAccessor(options =>
            {
                // 配置默认数据库
                options.AddDbPool<DefaultDbContext>($"{DbProvider.SqlServer}@2008");
            });
        }
    }
}
